

#include "xmodule_config.h"

#if MODULE_ECG_ENABLE

#include <string.h>

const em_ecg_instance_t* ECG_SENSOR_LIST[] = 
{

#if LH001_ENABLE
    &ECG_LH001,
#endif 
    
};


const em_ecg_instance_t* em_ecg_list_mouting( em_ecg_desc_t* p_desc )
{
    em_ecg_desc_t desc;
    desc.chip_id = 0;
    for(int i = 0; i < sizeof( ECG_SENSOR_LIST)/sizeof(ECG_SENSOR_LIST[0]); i ++ )
    {
        if( ECG_SENSOR_LIST[i]->mounting( &desc ) )
        {
            if( p_desc != NULL )
            {
                *p_desc = desc;
            }
            return ECG_SENSOR_LIST[i];
        }
    }
    return NULL;
}

#endif 
